<#

.SYNOPSIS

Given a directory of Windows drivers, this creates a simple board support package (BSP) manifest file which contains the specified drivers

.DESCRIPTION

Create-DevboardSupportPackage will enumerate all of the INF files in the SourceDirectory and create an initial manifest file which lists all of the discovered drivers.  The resulting BSP can be applied to a Windows image file (WIM) using Create-DevboardImage.ps1 or New-DevboardImage.

Drivers in the tree which should not be installed as part of the BSP can be added to a ".ignore" file in the root directory.  Any INF file listed in .ignore will not be added to the manifest.

.PARAMETER SourceDirectory

The path to the root of the BSP

.PARAMETER Destination

The name of the manifest file to create.

.NOTES

This script is a wrapper around the New-BspManifest cmdlet in the DevBoard module.  New-BspManifest allows for the addition of tools and firmware images into the BSP as well.

.LINK
	Create-DevboardImage.ps1
	
	New-BspManifest
#>

param (
    [parameter(Mandatory=$true)]
    $SourceDirectory,

    $Destination = "DevBoardPackageManifest.xml"
    )
    
Set-StrictMode -Version 3.0

Import-Module $PSScriptRoot\DevBoard
$manifest = New-BspManifest -RootDirectory $SourceDirectory -Import
$manifest.Save($Destination)
